<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        class Person {
            constructor() {}; // 构造函数，调用new 自动执行
            showname() {
                return '这是showname方法'
            }

            static aaa() {
                return 'aaa000这是静态方法'
            }
        };

        let p1 = new Person();
        console.log(p1.showname());

        // 静态方法：就是类身上的方法
        // static aaa(){}
        // 父类.aaa()
        console.log(Person.aaa());
    </script>
</body>

</html>